package me.zhengjie.modules.base.utils;

import org.apache.tomcat.jni.Local;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class TimeUtil {
    /**
     * 设置过期时间为次日凌晨三点
     */
    public static LocalDateTime getExpireTime(){
        // 获取当前时间
        LocalDateTime time = LocalDateTime.now();

        return time
                .plusDays(1)   // 添加一天
                .withHour(3)   // 设置小时为3点
                .withMinute(0) // 设置分钟为0
                .withSecond(0) // 设置秒数为0
                .withNano(0);
    }
}
